In case an actor easing is created without an explicit duration, we
should rely to the default animation that Clutter.Actor.save_easing_state()
sets to 250ms.
This fine in normal use cases, but in case the animations are disabled
the current code skips calling our Clutter.Actor.set_easing_duration()
override, and so we just end up leaving the actor easing time to 250ms,
not respecting the St settings
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3983>
const animationRequired = params.animationRequired;
delete params.animationRequired;
- if (params.duration !== undefined)
- actor.set_easing_duration(params.duration, {animationRequired});
+ const duration = params.duration ?? actor.get_easing_duration();
+ actor.set_easing_duration(duration, {animationRequired});
delete params.duration;
if (params.delay !== undefined)